package com.best.controller;

import com.best.dto.LabelSelect;
import com.best.service.LabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 下拉框
 *
 * @author yangruyi
 * @date 2021/3/11
 */
@RestController
@RequestMapping("/select/")
public class SelectController {
    @Autowired
    private LabelService labelService;

    /**
     * 菜系
     *
     * @return List
     */
    @GetMapping("series")
    public List<LabelSelect> seriesLabel(){
        return labelService.seriesLabel();
    }

    /**
     * 功效
     *
     * @return List
     */
    @GetMapping("effect")
    public List<LabelSelect> effectLabel(){
        return labelService.effectLabel();
    }

    /**
     * 审核状态
     *
     * @return List
     */
    @GetMapping("state")
    public List<LabelSelect> stateLabel(){
        return labelService.stateLabel();
    }

    /**
     * 口味
     *
     * @return List
     */
    @GetMapping("taste")
    public List<LabelSelect> tasteLabel(){
        return labelService.tasteLabel();
    }

}
